<template>
  <div>
    <a :href="url">跳转3</a>
    <button @click="onLink1">跳转1</button>
    <button @click="onLink2">跳转2</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list: [],
      url: 'https://www.baidu.com'
    }
  },
  methods: {
    onLink1() {
      location.href = this.url
    },
    onLink2() {
      window.open(this.url, '_blank')
    }
  },
  mounted() {}
}
</script>
<style type="text/css">
.box {
  border: 1px solid #000;
  align-self: center;
}
.box-wrap {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  gap: 10px;
}
</style>
